package cn.bmbanjia.zebra2024.apps.laddieAndroid.marketingCampaignClew.controller;

import cn.bmbanjia.zebra2024.apps.laddieAndroid.marketingCampaignClew.req.MCCCreateReq;
import cn.bmbanjia.zebra2024.apps.laddieAndroid.marketingCampaignClew.req.MCCListSearchReq;
import cn.bmbanjia.zebra2024.apps.laddieAndroid.marketingCampaignClew.resp.MCCDetailListResp;
import cn.bmbanjia.zebra2024.apps.laddieAndroid.marketingCampaignClew.service.IMarketingCampaignClewService;
import cn.bmbanjia.zebra2024.frame.resp.Resp;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import jakarta.annotation.Resource;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * 小哥限时推单线索 控制层。
 *
 * @author fugui
 * @since 2024-07-10
 */
@RestController
@RequestMapping("/laddieAndroid/marketingCampaignClew")
@Tag(name = "小哥限时推单")
public class MarketingCampaignClewController {

    @Resource
    private IMarketingCampaignClewService marketingCampaignClewService;

    @Operation(summary = "list")
    @PostMapping("/list")
    public Resp<List<MCCDetailListResp>> list(@RequestBody @Validated MCCListSearchReq req) {
        return marketingCampaignClewService.list(req);
    }

    @Operation(summary = "create")
    @PostMapping("/create")
    public Resp<Void> create(@RequestBody @Validated MCCCreateReq req) {
        return marketingCampaignClewService.create(req);
    }

}
